@FOR /F "tokens=3" %%i IN (%1) DO @if not %%i.==%3. @set /p =%%i <nul >>%2